<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>v-on</title>
	</head>
	<body>
		<div id="app">
			<input type="button" @click="doIt(1,3)" value="click me!"/>
			<input type="text" @keyup.enter="sayHi" value="sayHi"/>
			<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
			<script>
				var app = new Vue({
					el:'#app',
					methods:{
						doIt:function(p1,p2){
							var a = p1+p2;
							alert(a)
						},
						sayHi:function(){
							alert('hello!')
						}
					}
				})
			</script>
		</div>
	</body>
</html>
